package com.laoxu.demo.druid_demo.controller;

import com.laoxu.demo.druid_demo.model.User;
import com.laoxu.demo.druid_demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/user")
@RestController
public class UserController {
    @Autowired
    UserService userService;

    @GetMapping("/list")
    public List<User>  list(){
        return userService.list(null);
    }
}
